<script>
	import service from '@/service.js';
	export default {
		computed: {
			i18n () {
				return this.$t('index')
			}
		},
		onLaunch: function() {
			console.log('App Launch');
		},
		onShow: function() {
			var page = service.config.pages;
			var height = '';
			uni.getSystemInfo({
				success: (res) => {
					var heig = res.windowHeight;
					height = 'height:'+heig+'px;';
				}
			});
			if(uni.getStorageSync("lang") == ''){
				var lang = 'chn';
			}else{
				var lang = uni.getStorageSync("lang");
			}
			this._i18n.locale = lang;
			var content = {
				contentdown: this.i18n.tabbar.down,
				contentrefresh: this.i18n.tabbar.refresh,
				contentnomore: this.i18n.tabbar.nomore,
				contenttemporary: this.i18n.tabbar.temporary
			}
			var error = this.i18n.tabbar.error;
			var windows = this.i18n.tabbar.windows;
			uni.setStorageSync('type',1);
			uni.setStorageSync("page",page);
			uni.setStorageSync("lang",lang);
			uni.setStorageSync('error',error);
			uni.setStorageSync("height",height);
			uni.setStorageSync("content",content);
			uni.setStorageSync('windows',windows);
			console.log('App Show');
		},
		onHide: function() {
			console.log('App Hide');
		}
	}
</script>

<style>
	/*每个页面公共css */
	/* uni-app默认全局使用flex布局。因为flex布局有利于跨更多平台，尤其是采用原生渲染的平台。如不了解flex布局，请参考http://www.w3.org/TR/css3-flexbox/。如不使用flex布局，请删除或注释掉本行。*/
	body,
	page {
		min-height: 100%;
		display: flex;
	}

	/* #ifdef MP-BAIDU */
	page {
		width: 100%;
		height: 100%;
		display: block;
	}

	swan-template {
		width: 100%;
		min-height: 100%;
		display: flex;
	}

	/* 原生组件模式下需要注意组件外部样式 */
	custom-component {
		width: 100%;
		min-height: 100%;
		display: flex;
	}

	/* #endif */

	/* 原生组件模式下需要注意组件外部样式 */
	m-input {
		width: 100%;
		min-height: 100%;
		display: flex;
	}

	.content {
		display: flex;
		flex: 1;
		flex-direction: column;
		width: calc(100% - 40upx);
		padding: 20upx;
	}
	/* uni-tabbar .uni-tabbar-border{
		top:120upx;
	}
	uni-tabbar .uni-tabbar__icon{
		width: 60upx;
		height: 60upx;
	}
	uni-tabbar .uni-tabbar__bd{
		height: 120upx;
	} */
	uni-page-head .uni-page-head-hd{
		opacity: 0;
	}
	
	/* 返回键 */
	/* .back .btn-icon{
		margin-top: -90upx;
		position: fixed;
		margin-left: -14upx;
		width: 64upx;
		height: 64upx;
		z-index: 10000;
		color: #FFFFFF;
	} */
	
	/* 返回键 */
	.page-return{
		z-index: 1000;
		width: 40upx;
		height: 40upx;
		position: fixed;
		margin: 24upx;
		/* #ifndef H5 */
		margin-top: 54upx;
		/* #endif */
		top:0;
	}
	.back .btn-icon{
		position: fixed;
		margin-top: -80upx;
		margin-left: -14upx;
		width: 64upx;
		height: 64upx;
		z-index: 10000;
		color: #FFFFFF;
	}
	/* #ifndef H5 */
	.back .btn-icon{
		margin-top: 00upx;
	}
	/* #endif */
	/* 返回键 */
	
	/* 表单样式 */
	.input-group{
		width: 100%;
	}
	.top-left{
		z-index: 20;
		width: 200upx;
		height: 100upx;
		position: relative;
		margin: 30upx 20upx;
	}
	.btn-row {
		padding: 0 30upx;
	}
	.log-lable {
		font-size: 48upx;
		font-weight: bold;
		text-align: center;
		color: rgba(0, 0, 0, 1);
		margin-bottom: 60upx;
		position: relative;
		z-index: 20;
	}
	.log-input{
		height: 100upx;
		margin: 0 30upx 50upx;
		line-height: 100upx;
		background: rgba(250,49,161,.2);
		border-radius: 50upx;
		position: relative;
		z-index: 30;
		/* border-bottom:2upx solid #C8C7CC; */
	}
	.log-img{
		float: left;
		width: 60upx;
		height: 60upx;
		margin: 10upx 0%;
		margin-left: 3%;
	}
	.log-icon{
		right: 40upx;
		color: #37bac9;
		z-index: 10000;
		margin-top: 80upx;
		position: absolute;
	}
	.log-text{
		color: #333333;
	}
	.uni-input-placeholder{
		line-height: 80upx;
	}
	.obtain{
		float: right;
		margin: 6upx;
		height: 88upx;
		color: #FFFFFF;
		font-size: 30upx;
		line-height: 88upx;
		text-align: center;
		border-radius: 44upx;
		width: calc(40% - 12upx);
		/* background-image: linear-gradient(left top, #de3daf 0%, #7027f0 100%); */
	}
	.memory{
		z-index: 30;
		color: #6D6D72;
		font-size: 28upx;
		position: relative;
		margin: 30upx 50upx;
	}
	.forget{
		float: right;
	}
	.reg{
		float: left;
	}
	.login{
		text-align: center;
	}
    .action-row {
        color: #37BAC9;
		font-size: 34upx;
		margin-top: 40upx;
		text-align: center;
    }
	.log-text,.row-left{
		font-size: 32upx;
		text-align: left;
		margin: 40upx 50upx 0;
	}
	.btn-row .primary1 {
		z-index: 30;
		height: 100upx;
		line-height: 100upx;
		position: relative;
		text-align: center;
		border-radius:50upx;
		color: #FFFFFF;
		background: #f793a4;
	}

	.btn-row .primary2 {
		height: 90upx;
		color: #37BAC9;
		line-height: 90upx;
		text-align: center;
		background: #FFFFFF;
		border-radius:20upx;
		border: 2upx solid #37bac9;
	}
	.input{
		width: 90%;
		margin-left: 5%;
		height: 80upx;
		line-height: 80upx;
	}
	.m-code{
		width: 56%;
		float: left;
		height: 80upx;
		line-height: 80upx;
	}
	.action-row,.row-left{
		margin-top: 10upx;
	}
	.textarea {
		color: #6D6D72;
		height: 120upx;
		padding: 0 30upx;
		font-size: 28upx;
		line-height: 60upx;
		background: #EEEEEE;
		margin: 10upx 30upx;
		width: calc(100% - 120upx);
	}
	.uni-textarea-placeholder{
	}
	.image,.img-src{
		color: #999999;
		font-size: 40upx;
		text-align: center;
		line-height: 100upx;
		background: #EEEEEE;
		margin: 10upx 30upx;
	}
	.addfile{
		width: 90%;
		padding: 20upx 5%;
	}
	.btn-submit{
		height: 90upx;
		color: #FFFFFF;
		font-size: 28upx;
		line-height: 90upx;
		border-radius: 45upx;
		margin: 50upx 50upx 0;
		background: #f793a4;
	}
	/* 表单样式 */
	
	/* 页面底图 */
	.back_img{
		width: 100%;
		height: 100%;
		position: fixed;
		z-index: 10;
		margin: -20upx;
	}
	/* #ifdef H5 */
	.back_img{
		height: calc(100% - 90upx);
	}
	/* #endif */
	/* 页面底图 */
	
	/* 顶部分栏 */
	.uni-swiper-tab {
		width: 100%;
		z-index: 1000;
		height: 70upx;
		margin: -20upx;
		position: fixed;
		line-height: 90upx;
		border-bottom: 2upx solid #E5E5E5;
		white-space: nowrap;
		background-color: #fff;
	}
	.uni-swiper-tab .active {
		color: #fff;
		background: #37bac9;
	}
	
	.swiper-tab-list {
		color: #666;
		height: 70upx;
		font-size: 30upx;
		line-height: 70upx;
		text-align: center;
		margin: 0 20upx;
		float: left;
		width: calc(25% - 40upx);
	}
	.uni-scroll-view {
		width: 100%;
		height: 100%;
		position: relative;
		max-height: inherit;
		-webkit-overflow-scrolling: touch;
	}
	.msg-list {
		width: 100%;
		margin: 30upx 0;
		overflow: scroll;
	}
	div {
		box-sizing: border-box;
	}
	/* 顶部分栏 */
	
	/* 二维码推广 */
	.qrcode-img{
		margin-top: 30%;
		z-index: 998;
		width: 360upx;
		height: 360upx;
		position: fixed;
		left: calc(50% - 180upx);
	}
	.qrcode-img image{
		width: 360upx;
		height: 360upx;
		position: fixed;
	}
	.industry{
		margin: -20upx;
		margin-top: calc(30% + 400upx);
		z-index: 998;
		width: 100%;
		font-size: 28upx;
		position: fixed;
		text-align: center;
		color: #37bac9;
		user-select:text;
	}
	.industry1{
		margin: -20upx;
		margin-top: calc(30% + 470upx);
		z-index: 998;
		width: 100%;
		font-size: 28upx;
		position: fixed;
		text-align: center;
		color: red;
		user-select:text;
	}
	/* 二维码推广 */
	
	
	
	/* 弹窗样式 */
	.popup{
		width: 100%;
	}
	.shut{
		float: right;
		width: 60upx;
		height: 60upx;
	}
	.popup image{
		width: 100%;
	}
	.pop-title{
		font-size: 32upx;
		line-height: 60upx;
		text-align: center;
	}
	.pop-input,.pop-code{
		width: calc(100% - 40upx);
		height: 60upx;
		font-size: 28upx;
		padding: 0 20upx;
		margin-top: 30upx;
		line-height: 60upx;
		border:2upx solid #C0C4CC;
	}
	.pop-code{
		border:0;
		margin: 0;
		padding: 0;
		width: calc(70% - 40upx);
	}
	.pop-obtain{
		width: 35%;
		float: right;
		height: 60upx;
		color: #FFFFFF;
		font-size: 30upx;
		line-height: 60upx;
		text-align: center;
		margin-top: -60upx;
		margin-right: -20upx;
		background-image: linear-gradient(left top, #de3daf 0%, #7027f0 100%);
	}
	.pop-left,.pop-right{
		width: 40%;
		float: left;
		height: 60upx;
		color: #e940a1;
		font-size: 28upx;
		margin-top: 30upx;
		text-align: center;
		line-height: 60upx;
		border-radius: 10upx;
		border:2upx solid #8b39f8;
	}
	.pop-right{
		float: right;
		color: #FFFFFF;
		background: linear-gradient(left, #e940a1, #8b39f8);
	}
	/* 弹窗样式 */
</style>
